package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 *复制图片
 */
public class CreateDemo2 {
    public static void main(String[] args) throws IOException {
FileInputStream fis =new FileInputStream("image.png");
FileOutputStream fos =new FileOutputStream("copyImage.png");
int data;
while ((data=fis.read())!=-1){
    fos.write(data);
}
fis.close();
fos.close();
    }
}
